package com.scedu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.scedu.entity.User;
import com.scedu.mapper.UserDao;
import com.scedu.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author sc
 * @since 2020-06-01
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserDao, User> implements UserService {
   @Autowired
   UserDao dao;
    @Override
    public User findByUserName(String userName) {
        QueryWrapper<User> wrapper = new QueryWrapper<>();
        wrapper.eq("username",userName);
        return dao.selectOne(wrapper);

    }
}
